import org.omg.CORBA.UserException;

import java.util.Scanner;
public class Main {
    public static void func(String m1,String UserNmae1,String Email){
        if (!(UserNmae1.length()>=2&&4>=UserNmae1.length())){
            throw new RuntimeException("用户名不正确");
        }
        if (m1.length()!=6||!isD(m1)){
            throw new RuntimeException("密码不正确");
        }
        if (!("@".contains(Email)&&".".contains(Email))||Email.indexOf('@')>Email.indexOf(".")){
            throw new RuntimeException("Email不正确");
        }
    }
    public static boolean isD(String m){
        char[] isd=m.toCharArray();
        for (int i = 0; i <isd.length ; i++) {
            if (isd[i]>'0'&&isd[i]<'9'){
                return false;
            }
        }
        return true;
    }
    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
        System.out.println("请输入密码：");
        String m= scanner.nextLine();
        System.out.println("请输入用户名：");
        String UserName=scanner.nextLine();
        System.out.println("请输入Email：");
        String Email=scanner.nextLine();
      try {
            func(m,UserName,Email);
      }catch (Exception e){
          System.out.println(e.getMessage());
      }

    }
}